<?php
namespace Admin\Controller;
use Think\Controller;
/**
* Category
*/
class CategoryController extends Controller
{
	public function index()
	{
		//视图模型
		/*$cat = D('CategoryView');
		$list = $cat->select();
		dump($list);*/

		//关联模型
		$cat = D('Category');
		$list = $cat->relation(true)->find(1);
		dump($list);
	}
	public function helper()
	{
		echo "提取单元中的所有数据，供用户选择，进行菜单项的创建";
		$sec = D('Category');
		$list = $sec->select();
		dump($list);
		echo '<a href="'.__APP__.'/'.MODULE_NAME.'/Menuitem/add">下一步</a>';
	}
}